package com.balaganovrocks.yourmasterclean.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.balaganovrocks.yourmasterclean.R;

public class ResultActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result);

        Button btngo_to_saving_battery = (Button) findViewById(R.id.goto_saving_battery);
        Button btngoto_memory_clean = (Button) findViewById(R.id.goto_memory_clean);
        Button btngoto_rate_app = (Button) findViewById(R.id.goto_rate_app);
        btngo_to_saving_battery.setOnClickListener(onClickListener);
        btngoto_memory_clean.setOnClickListener(onClickListener);
        btngoto_rate_app.setOnClickListener(onClickListener);
    }


    private View.OnClickListener onClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch (v.getId()) {
                case R.id.goto_saving_battery:
                    Intent intent = new Intent(v.getContext(), BatterySavingActivity.class);
                    startActivityForResult(intent, 0); // do something
                    break;
                case R.id.goto_memory_clean:
                    Intent intent2 = new Intent(v.getContext(), MemoryCleanActivity.class);
                    startActivityForResult(intent2, 0); // do something
                    break;
                case R.id.goto_rate_app:
                    //  Intent browserIntent = new
                    //          Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com"));
                    //  startActivity(browserIntent);
                    break;
            }

        }
    };
}
